Walkthrough #1 - Creating a New Custom Script-Based Study

Modified on 2017/11/07 14:18 by Rob Rrickson (CTS) — Categorized as: Uncategorized

This walkthrough will show you how to create new script-based studies to add to your charts.

To start, click the Add Study button on the chart to open the Add Study window.

Image

The Add Study window will open. Click the New Custom Study button to create a new script-based study.

Image

The window will change to following:

Image

Here you will select whether you would like to create an overlay or an indicator study. Overlay studies appear on the same chart panel as the price bars and their study values are in prices. Indicator studies appear in their own chart panel separate from the price bars. This cannot be changed after the study is created (name, short name, category and description can be changed at anytime after the study is created.)

Scripts should be given a name (Simple Moving Average), a short name (SMA) and a description.

The category allows you to change where in the list of studies this new study will get grouped. This applies only to indicator studies. All overlay studies are grouped together.

If you do not want to write your script from scratch, but rather start with a pre-defined template you may select a template from the list. Templates are fully functional scripts that you take and modify to suit your needs.

Image

The fields on this window are described as follows:

Create Study Window Fields
FieldDescription
TypeSelect whether the script will be an overlay or an indicator study. This cannot be changed after the study is created.
NameA name for the study.
Short NameA short name for the study (e.g. SMA, BB, VOL, etc)
CategoryDetermines where this new study will appear in the list of studies in the Add Study window.
DescriptionA description of the study and what is does.
TemplatePre-defined full functional study templates that you can select from so that you don't have to start from scratch.
PreviewA preview of the selected study template.

Once you have completed setting up your study, click the Create button to have the study created and added to the list of available studies.

The Add Study will change back to display the list a available studies. The new study you just created will be automatically selected.

Image

Simply click the Add button to add the study to your chart.

A few more words about the Add Study window...

Custom script-based studies appear in blue.

Image

Right-clicking a custom study opens a context menu with additional actions you can take on these studies:

Image

Custom Study Context Menu
Menu ItemDescription
Edit ScriptOpen the script editor to allow you to immediately start editing the script. The study will be added to the chart if it is not already there.
Export ScriptExports the script to a file. This allows you to share the script with someone else.
Copy ScriptSimply creates a copy of the study.
Delete ScriptDeletes the study permanently. The study will get removed from all charts that are using it.

Additionally, the Add Study window has an import button. Use this feature to import scripts that you saved off, or sent to you by someone else. Important: in order to do this you need to be enabled for the Advanced Data Package

Image

1To install the script, save the .XML file you created to your computer (Desktop or some other temporary location).
2 Next, open the Add Study window from any chart.
3 Click the Import Custom Study button and select the .XML file you saved to your computer.
4 A new study called will appear at the bottom of the study list. Double-click it to add to your chart.
5 Once imported, this study will travel with your saved settings, so there is no need to hold onto the .XML file you saved to your computer… you can delete it.